import { useState } from "react";
import { Divider, AutoComplete } from "antd";

const options = [
    {
        value: "Burns Bay Road",
    },
    {
        value: "Downing Street",
    },
    {
        value: "Wall Street",
    },
];
const View = () => {
    const handleSearch = (value) => {
        console.log(value);
    };
    return (
        <div>
            <Divider>基本使用</Divider>
            <AutoComplete
                options={options}
                onSearch={handleSearch}
                style={{ width: 200 }}
            />
            <Divider>自定义选项</Divider>
            <AutoComplete
                style={{ width: 200 }}
                onSearch={handleSearch}
                placeholder='input here'
                options={options}
                allowClear={true}
            />
        </div>
    );
};

export default View;
